Optimal. Leaf size=67 \[ -\frac {i a \cos ^4(c+d x)}{4 d}+\frac {a \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {3 a \sin (c+d x) \cos (c+d x)}{8 d}+\frac {3 a x}{8} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {3486, 2635, 8} \[ -\frac {i a \cos ^4(c+d x)}{4 d}+\frac {a \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {3 a \sin (c+d x) \cos (c+d x)}{8 d}+\frac {3 a x}{8} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2635
Rule 3486
Rubi steps
\begin {align*} \int \cos ^4(c+d x) (a+i a \tan (c+d x)) \, dx &=-\frac {i a \cos ^4(c+d x)}{4 d}+a \int \cos ^4(c+d x) \, dx\\ &=-\frac {i a \cos ^4(c+d x)}{4 d}+\frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {1}{4} (3 a) \int \cos ^2(c+d x) \, dx\\ &=-\frac {i a \cos ^4(c+d x)}{4 d}+\frac {3 a \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {1}{8} (3 a) \int 1 \, dx\\ &=\frac {3 a x}{8}-\frac {i a \cos ^4(c+d x)}{4 d}+\frac {3 a \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 46, normalized size = 0.69 \[ \frac {a \left (8 \sin (2 (c+d x))+\sin (4 (c+d x))-8 i \cos ^4(c+d x)+12 c+12 d x\right )}{32 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 56, normalized size = 0.84 \[ \frac {{\left (12 \, a d x e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a e^{\left (6 i \, d x + 6 i \, c\right )} - 6 i \, a e^{\left (4 i \, d x + 4 i \, c\right )} + 2 i \, a\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{32 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.54, size = 103, normalized size = 1.54 \[ \frac {{\left (12 \, a d x e^{\left (2 i \, d x + 2 i \, c\right )} + i \, a e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - i \, a e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x\right )} + e^{\left (-2 i \, c\right )}\right ) - i \, a e^{\left (6 i \, d x + 6 i \, c\right )} - 6 i \, a e^{\left (4 i \, d x + 4 i \, c\right )} + 2 i \, a\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{32 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.44, size = 53, normalized size = 0.79 \[ \frac {-\frac {i a \left (\cos ^{4}\left (d x +c \right )\right )}{4}+a \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.92, size = 61, normalized size = 0.91 \[ \frac {3 \, {\left (d x + c\right )} a + \frac {3 \, a \tan \left (d x + c\right )^{3} + 5 \, a \tan \left (d x + c\right ) - 2 i \, a}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.34, size = 64, normalized size = 0.96 \[ \frac {3\,a\,x}{8}+\frac {\frac {3\,a\,{\mathrm {tan}\left (c+d\,x\right )}^2}{8}+\frac {3{}\mathrm {i}\,a\,\mathrm {tan}\left (c+d\,x\right )}{8}+\frac {a}{4}}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^3+{\mathrm {tan}\left (c+d\,x\right )}^2\,1{}\mathrm {i}+\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.29, size = 139, normalized size = 2.07 \[ \frac {3 a x}{8} + \begin {cases} - \frac {\left (256 i a d^{2} e^{6 i c} e^{4 i d x} + 1536 i a d^{2} e^{4 i c} e^{2 i d x} - 512 i a d^{2} e^{- 2 i d x}\right ) e^{- 2 i c}}{8192 d^{3}} & \text {for}\: 8192 d^{3} e^{2 i c} \neq 0 \\x \left (- \frac {3 a}{8} + \frac {\left (a e^{6 i c} + 3 a e^{4 i c} + 3 a e^{2 i c} + a\right ) e^{- 2 i c}}{8}\right ) & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________